package com.yunc.common.utils;

/**
 * 常用状态
 **/
public final class BaseConstant {

    /**
     * 操作成功
     */
    public static String CODE_SUCCESS = "success";
    /**
     * 操作失败
     */
    public static String CODE_ERROR="error";
    public static Integer OAUTH_CODE_ERROR = 520;

    public static String CODE_TOKEN_ERROR = "tokenError";

    /**
     * 自动登录
     */
    public static Integer CODE_AUTOLOGIN_Y=1;
    /**
     * 非自动登录
     */
    public static Integer CODE_AUTOLOGIN_N=2;

    public static String LOGIN_ERROR_NOID="登录名不存在！";
    public static String LOGIN_ERROR_PSW="登录名与密码不一致！";
    public static String DATABASE_ERROR_DELETE="删除失败!";
    public static String DATABASE_ERROR_INSERT="添加失败!";
    public static String DATABASE_ERROR_UPDATE="修改失败!";
    public static String DATABASE_ERROR_CANSHU="参数错误!";
    public static String DATABASE_ERROR_BUCHUNZAI="没有匹配的数据!";
    public static String LOGIN_USERIS_Y="登录名【NAME】已经存在!";

    /** 分页默认参数 */
    public static final int PAGE_NUM = 1;
    public static final int PAGE_SIZE = 15;

    public static final String REMOVE_Y = "Y";
    public static final String REMOVE_N = "N";

    public static final String ITEM_STATUS_GROUNDING = "1";

    public static final String OA_ACTIVITI_SAVE = "1";
    public static final String OA_ACTIVITI_SUBMIT = "2";

    public static final String ADDRESS_TYPE_NORMAL = "1";
    public static final String ADDRESS_TYPE_DEFAULT = "2";

    public enum SuccessErrorStatus {
        /**
         * 成功
         */
        SUCCESS("0"),
        /**
         * 失败
         */
        ERROR("1");

        private String value;

        private SuccessErrorStatus(String value)
        {
            this.value = value;
        }

        public String getValue()
        {
            return value;
        }
    }

    public enum SchedulerStatus {
        /**
         * 正常
         */
        NORMAL("0"),
        /**
         * 暂停
         */
        PAUSE("1");

        private String value;

        private SchedulerStatus(String value)
        {
            this.value = value;
        }

        public String getValue()
        {
            return value;
        }
    }

    public enum MenuType {
        /**
         * 目录
         */
        CATALOG("0"),
        /**
         * 菜单
         */
        MENU("1"),
        /**
         * 按钮
         */
        BUTTON("2");

        private String value;

        private MenuType(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 云服务商
     */
    public enum CloudService {
        /**
         * 七牛云
         */
        QINIU(1),
        /**
         * 阿里云
         */
        ALIYUN(2),
        /**
         * 腾讯云
         */
        QCLOUD(3);

        private int value;

        private CloudService(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 订单状态
     */
    public enum OrderStatus {

        /**
         * 未付款
         */
        NONPAY("1"),
        /**
         * 已付款
         */
        PAY("2"),
        /**
         * 未发货
         */
        NONSEND("3"),
        /**
         * 已发货
         */
        SEND("4");

        private String value;

        private OrderStatus(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    public interface RedisKey {
        /**
         * redis库存
         */
        String REDIS_GOODS_STORE = "REDIS_GOODS_STORE_NAME:{0}";
    }
}
